package com.shtel.paas.monitorcenter.view.dispaly.distributead.ddatabase.monitor.controller;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.shtel.paas.monitorcenter.util.Page;
import com.shtel.paas.monitorcenter.view.dispaly.distributead.ddatabase.monitor.entity.DistributeaddDatabaseMonitorEntity;
import com.shtel.paas.monitorcenter.view.dispaly.distributead.ddatabase.monitor.service.DistributeaddDatabaseMonitorService;
import com.shtel.paas.monitorcenter.view.dispaly.distributead.ddatabase.monitor.vo.DistributeaddDatabaseMonitorVo;
//import com.shtel.paas.sdk.core.RefreshableRestController;
//import com.shtel.paas.sdk.core.mybatis.EnablePaasMybatis;

import org.springframework.web.bind.annotation.RestController;//@EnablePaasMybatis

@MapperScan("com.shtel.paas.monitorcenter.view.dispaly.distributead.ddatabase.monitor.mapper")
@RestController
public class DistributeaddDatabaseMonitorController {

	@Autowired
	DistributeaddDatabaseMonitorService distributeaddDatabaseMonitorService;

	@GetMapping("/selectDistributedDatabaseMonitorInfo")
	public Page<DistributeaddDatabaseMonitorVo> selectDistributeaddDatabaseMonitorInfo(
			@RequestParam("page") Integer page,
			@RequestParam("size") Integer pageSize,
			@RequestParam("hostName") String hostName,
			@RequestParam("systemName") String systemName) {
		DistributeaddDatabaseMonitorEntity parameter = new DistributeaddDatabaseMonitorEntity();
		parameter.setPage(page);
		parameter.setSize(pageSize);
		parameter.setHostName(hostName);
		parameter.setSystemName(systemName);
		Page<DistributeaddDatabaseMonitorVo> result = distributeaddDatabaseMonitorService
				.selectDistributeaddDatabaseMonitorInfo(parameter);
		return result;
	}

}
